package ace.cmp.data.methodname.method.name.sql.test.core.dao.mapper;

import ace.cmp.data.methodname.method.name.sql.test.core.dao.entity.CasUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author caspar
 * @date 2023/2/15 13:42
 */
@Mapper
public interface CasUserMapper extends BaseMapper<CasUser> {
  @Select("SELECT * FROM cas_user")
  List<CasUser> findAllByPropertyMobile(String id);

  @Select("SELECT * FROM cas_user")
  List<CasUser> findAllByMobile(String id);

  CasUser findByTest(String id);

  CasUser findAllByMobileAndNameOrderByIdAsc(
      @Param("mobile") String mobile, @Param("name") String name);

  List<CasUser> findIdAndNameByMobileAndNameOrderByIdAsc(
      @Param("mobile") String mobile, @Param("name") String name);
}
